<?php

	$this->Html->script(array('flexigrid.pack','jquery.maskedinput-1.2.2.min','maskinput','jquery.ui.datepicker-pt-BR','datepicker'), false);
	$this->Html->css('flexigrid', null, array('inline' => false));
	
	echo $this->Form->create('Convenio');
	echo $this->Form->input('id');
	echo $this->Form->input('nome',array('type' => 'text', 'class' => 'tamanho50', 'label' => __('Nome'), 'maxlength' => 100));
	echo $this->Form->input('nome_curto',array('type' => 'text', 'class' => 'tamanho50', 'label' => __('Nome Curto'), 'maxlength' => 50));
	echo $this->Form->input('dia_pagamento',array('type' => 'text', 'class' => 'tamanho10', 'label' => __('Dia Pagto'), 'maxlength' => 2));
	echo '<div style="clear:both"></div>';	
	
?>

<div id="tabs">

	<ul>
		<li><a href="#tabs-DadosCadastrais">Dados Cadastrais</a></li>
		<li><a href="#tabs-NotaFiscal">Dados Nota Fiscal</a></li>
		<li><a href="#tabs-ObsGerais">Obs. Gerais</a></li>
	</ul>
	
	<div id="tabs-DadosCadastrais" class="painel_tabs">	

		<?php
			echo $this->Form->input('logomarca',array('type' => 'text', 'class' => 'tamanho50', 'label' => __('Logomarca'), 'maxlength' => 100));
			echo '<div style="clear:both;"></div>';
			echo $this->Form->input('codigo',array('type' => 'text', 'class' => 'tamanho10', 'label' => __('Cód. Credenciamento'), 'maxlength' => 10));
			echo $this->Form->input('ans',array('type' => 'select', 'options' => $Sim_Nao, 'empty' => ' ', 'class' => 'tamanho10', 'label' => __('ANS')));
			echo $this->Form->input('numero',array('type' => 'text', 'class' => 'tamanho10', 'label' => __('Número'), 'maxlength' => 10));
			echo $this->Form->input('tipo_cbo',array('type' => 'select', 'options' => $tipo_cbo, 'empty' => ' ', 'class' => 'tamanho20', 'label' => __('Tipo Cbo\'s')));			
			echo $this->Form->input('data_contrato', array('label' => __('Data Contrato'), 'type' => 'text', 'class' => 'maskdata data'));
			echo $this->Form->input('banco_id',array('type' => 'select', 'options' => $bancos, 'empty' => 'Selecione...', 'class' => 'tamanho30', 'label' => __('Banco')));				
			echo '<div style="clear:both;"></div>';
			echo $this->Form->input('site',array('type' => 'text', 'class' => 'tamanho50', 'label' => __('Site'), 'maxlength' => 100));
			echo $this->Form->input('login',array('type' => 'text', 'class' => 'tamanho20', 'label' => __('Login'), 'maxlength' => 20));
			echo $this->Form->input('senha',array('type' => 'text', 'class' => 'tamanho20', 'label' => __('Senha'), 'maxlength' => 20));			
		?>
		
	</div>

	<div id="tabs-NotaFiscal" class="painel_tabs">
	
		<?php 
			echo $this->Form->input('envia_nf',array('type' => 'select', 'options' => $Sim_Nao, 'empty' => ' ', 'class' => 'tamanho10', 'label' => __('Envia NF')));
			echo '<div style="clear:both;"></div>';
			echo $this->Form->input('nome_nf',array('type' => 'text', 'class' => 'tamanho50', 'label' => __('Nome Nota Fiscal'), 'maxlength' => 100));
			echo '<div style="clear:both;"></div>';
			echo $this->Form->input('cnpj',array('class' => 'maskcnpj cnpj', 'label' => __('CNPJ')));
			echo $this->Form->input('inscricao_estadual',array('type' => 'text', 'class' => 'tamanho20', 'label' => __('InscriçãoEstadual'), 'maxlength' => 20));
			echo '<div style="clear:both;"></div>';
		    echo $this->Form->input('observacao', array('label' => __('Observações'), 'type' => 'textarea', 'maxlength' => 500, 'style' => 'height:100px;width:99%'));
		?>
		
	</div>	
	
	<div id="tabs-ObsGerais" class="painel_tabs">
		<?php echo $this->Form->input('observacao', array('label' => false, 'type' => 'textarea', 'style' => 'height:350px;width:99%')); ?>
	</div>	
		
</div>

<?php	
	echo '<div class="botoes_form">';
	echo $this->Form->button('Salvar', array('type' => 'submit'));
	echo $this->Form->button('Voltar', array('type'=>'button', 'onClick' => "javascript:location='{$this->request->base}/{$this->request->controller}/index'"));
	echo '</div>'; 
	echo $this->Form->end();
?>

<script>

	$( "#tabs" ).tabs();

</script>	